import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

// state
const state = {
  isCollapse: false
}

// getters
const getters = {
  isCollapse: state => {
    console.log('the state isCollapse : ' + state.isCollapse)
  }
}

// mutations
const mutations = {
  changeIsCollapse (state) {
    state.isCollapse = !state.isCollapse
    console.log('the state isCollapse : ' + state.isCollapse)
  }
}

// actions
const actions = {}

export default new Vuex.Store({
  state,
  getters,
  mutations,
  actions
})
